<template>
	<view class=" p-b-40">
		<mescroll-body ref="mescrollRef" @init="mescrollInit" @up="upCallback" :up="upOption"  @down="downCallback">
			<view class="p-l-20 p-r-20 p-t-10">
				
				<invoice-item :item="item"></invoice-item>
			</view>
		</mescroll-body>
		
		<view class="add-btn p-l-20 p-r-20">
			<button class="bg-color white br10 bold p-t-8 p-b-8" @click="goto('/bundle/pages/set_invoice/set_invoice')" >新建发票</button>
		</view>
	</view>
</template>

<script>
	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
	export default {
		mixins: [MescrollMixin], // 使用mixin
		data() {
			return {
				upOption: {
					empty: {
						icon: '/static/images/order_null.png',
						tip: '暂无记录', // 提示
					}
				},
			}
		},
		methods: {
			goto(url){
				uni.navigateTo({
					url
				})
			},
			
		}
	}
</script>

<style lang="scss">
	$themeColor:rgb(232,86,49);
	.bg-color{
		background-color:$themeColor ;
	}
	.add-btn{
		width: 100%;
		position: fixed;
		bottom: 25upx;
	}
</style>
